Class symantec.itools.db.beans.binding.Mediator
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.db.beans.binding.Mediator

Object
   |
   +----symantec.itools.db.beans.binding.Mediator

public class Mediator
extends Object
implements DataItemChangedListener, DataBusEventListener, DataBusMember

Variable Index

 o Blank
A constant indicating how an empty string will be set when updating data on the dbANYWHERE server.
 o Component
 o DBus
 o Default
A constant indicating how an empty string will be set when updating data on the dbANYWHERE server.
 o Input
 o Null
A constant indicating how an empty string will be set when updating data on the dbANYWHERE server.
 o currentCursorNumber
 o dataBinding
name of the DataItem.
 o emptyMeansNull
 o getMethods
 o hasFoundGetMethod
 o hasFoundSetMethod
 o notifyOn
 o offset
 o output
 o recursionLevel
 o setMethods

Constructor Index

 o symantec.itools.db.beans.binding.Mediator()
Constructs the default mediator.
 o symantec.itools.db.beans.binding.Mediator(Object, String)
Constructs a Mediator given its output component and the full name of the fields it is supposed to show

Method Index

 o addVetoableChangeListener(VetoableChangeListener)
adds and removes vetoable change listeners for the data bus.
 o commit()
Updates the DataItem with the values present in the output component.
 o commitUI(TriggerUIEvent)
 o createDataItemFromArray(DataItem, Object[][])
 o finalize()
 o findDI()
finds a DataItem given its name
 o getCollectionSize(DataItem)
 o getDataBinding()
Returns the full name of the DataItem.
 o getDataBus()
Returns the current DataBus
 o getEmptyMeansNull()
 o getGetMethods()
Returns the full name of the current get method.
 o getNumberOfRows()
 o getOutput()
Returns the actual output component
 o getOutputSize()
Returns the actual size of the output component.
 o getSetMethods()
Returns the full name of the current set method.
 o getSlice(int, Object[][], int)
 o handleDataBusEvent(DataBusEvent)
Handles the DataBus events, in particular the Data available events sent by the QueryNavigators.
 o hasFoundDI()
returns true if the mediator has found his data Item;
 o killActualInput()
 o notifyDataItemChanged(DataItemChangedEvent)
Responds to the sollicitations of the DataItem.
 o notifyEnabled(boolean)
Sets the notify flag.
 o removeVetoableChangeListener(VetoableChangeListener)
 o requestDataItem(DataBusEvent)
Changes the value of the DataItem when requested by the DataBus
 o setDataBinding(String)
Sets the name for the actual Data Item.And searches the DataBus for it This method is very important in the sense that it is the one that actually connects the mediator to the data bus The format is "Tablename
 o setDataBus(DataBus)
Connects to the DataBus
 o setEmptyMeansNull(boolean)
 o setGetMethods(String[])
Sets the methods for displaying a value in the component.
 o setOutput(Object)
Sets the output component in witch the Mediator is going to display the data.
 o setOutputSize(Dimension)
Sets the dimension of the output component, meaning how many cells is it going to display.
 o setSetMethods(String[])
Sets the methods for retrieving a value from the component.
 o suicide()
 o update(DataItem)
Updates the values displayed in the output component if they are different from those in the DataItem.
 o update(DataItem, int, int)
 o update(DataItem, int[], int, int)

Variables

 o Blank
public static final int Blank
A constant indicating how an empty string will be set when updating data on the dbANYWHERE server.

 o Component
protected symantec.itools.db.beans.binding.OutputComponent Component
 o DBus
protected symantec.itools.db.beans.binding.databus.DataBus DBus
 o Default
public static final int Default
A constant indicating how an empty string will be set when updating data on the dbANYWHERE server.

 o Input
protected symantec.itools.db.beans.binding.databus.DataItem Input
 o Null
public static final int Null
A constant indicating how an empty string will be set when updating data on the dbANYWHERE server.

 o currentCursorNumber
protected int currentCursorNumber
 o dataBinding
protected java.lang.String dataBinding
name of the DataItem. This Name class contains all the methods for parsing and using the names.

 o emptyMeansNull
protected boolean emptyMeansNull
 o getMethods
protected java.lang.String[] getMethods
 o hasFoundGetMethod
protected boolean hasFoundGetMethod
 o hasFoundSetMethod
protected boolean hasFoundSetMethod
 o notifyOn
protected boolean notifyOn
 o offset
protected int offset
 o output
protected java.lang.Object output
 o recursionLevel
protected int recursionLevel
 o setMethods
protected java.lang.String[] setMethods

Constructors

 o Mediator
public Mediator()
Constructs the default mediator.

 o Mediator
public Mediator(Object Out,
                String name)
Constructs a Mediator given its output component and the full name of the fields it is supposed to show

Parameters:
Out - output component
name - fullname of the fields

Methods

 o addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
adds and removes vetoable change listeners for the data bus.

 o commit
public void commit()
Updates the DataItem with the values present in the output component.

 o commitUI
public void commitUI(TriggerUIEvent trui)
 o createDataItemFromArray
protected symantec.itools.db.beans.binding.databus.DataItem createDataItemFromArray(DataItem DI,
                                                                                    Object[][] obj)
 o finalize
protected void finalize() throws Throwable

Throws: Throwable
Overrides:
finalize in class Object
 o findDI
protected void findDI()
finds a DataItem given its name

 o getCollectionSize
protected java.awt.Dimension getCollectionSize(DataItem DI)
 o getDataBinding
public java.lang.String getDataBinding()
Returns the full name of the DataItem.

Returns:
the full name of the DataItem.
 o getDataBus
public symantec.itools.db.beans.binding.databus.DataBus getDataBus()
Returns the current DataBus

Returns:
the current DataBus
 o getEmptyMeansNull
public boolean getEmptyMeansNull()
 o getGetMethods
public java.lang.String[] getGetMethods()
Returns the full name of the current get method.

Returns:
the method for getting.
 o getNumberOfRows
public int getNumberOfRows()
 o getOutput
public java.lang.Object getOutput()
Returns the actual output component

Returns:
the output component
 o getOutputSize
public java.awt.Dimension getOutputSize()
Returns the actual size of the output component.

Returns:
the dimension of the output component
 o getSetMethods
public java.lang.String[] getSetMethods()
Returns the full name of the current set method.

Returns:
the method for setting.
 o getSlice
protected java.lang.Object[][] getSlice(int type,
                                        Object[][] obj,
                                        int j)
 o handleDataBusEvent
public void handleDataBusEvent(DataBusEvent ibe)
Handles the DataBus events, in particular the Data available events sent by the QueryNavigators.

Parameters:
ibe - the DataBusEvent
 o hasFoundDI
public boolean hasFoundDI()
returns true if the mediator has found his data Item;

 o killActualInput
protected void killActualInput()
 o notifyDataItemChanged
public void notifyDataItemChanged(DataItemChangedEvent e)
Responds to the sollicitations of the DataItem.

Parameters:
e - the DataItemChangedEvent
 o notifyEnabled
protected void notifyEnabled(boolean value)
Sets the notify flag.

 o removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
 o requestDataItem
public void requestDataItem(DataBusEvent ibe)
Changes the value of the DataItem when requested by the DataBus

Parameters:
ibe - the DataBusEvent
 o setDataBinding
public void setDataBinding(String name)
Sets the name for the actual Data Item.And searches the DataBus for it This method is very important in the sense that it is the one that actually connects the mediator to the data bus The format is "Tablename@col1,col2%NumberOfRows"

Parameters:
name - the name of the data to be shown
 o setDataBus
public void setDataBus(DataBus b) throws PropertyVetoException
Connects to the DataBus

Parameters:
b - the DataBus the mediator connects to
Throws: PropertyVetoException
 o setEmptyMeansNull
public void setEmptyMeansNull(boolean propertyValue)
 o setGetMethods
public void setGetMethods(String[] methodNames)
Sets the methods for displaying a value in the component.

Parameters:
methodNames - the names of the methods including their parameters i.e. {"get Focus(Row,Col)","getText()"}
 o setOutput
public void setOutput(Object Out)
Sets the output component in witch the Mediator is going to display the data.

Parameters:
Out - the output component
 o setOutputSize
protected void setOutputSize(Dimension size)
Sets the dimension of the output component, meaning how many cells is it going to display.

Parameters:
size - The desired size
 o setSetMethods
public void setSetMethods(String[] methodNames)
Sets the methods for retrieving a value from the component. therte methods are in an array of strings and will be executed one after the other

Parameters:
methodNames - the names of the methods including their parameters i.e. "setText(Value,Row,Col)"
 o suicide
protected void suicide()
 o update
protected void update(DataItem Input)
Updates the values displayed in the output component if they are different from those in the DataItem.

 o update
protected void update(DataItem Input,
                      int xcursor,
                      int ycursor)
 o update
protected void update(DataItem Input,
                      int columns,
                      int xcursor,
                      int ycursor)

All Packages  Class Hierarchy  This Package  Previous  Next  Index